/*******************************************************************************
 * Copyright (c) 2011 Grupo de Sistemas Inteligentes (GSI) - DIT UPM
 *
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *******************************************************************************/
package es.upm.dit.gsi.eclipse.jadex.adfmanager.wizards;

/**
 * Class that represents a "parameter" for the parameters management in the
 * AddGoalWizardPage3 class
 * 
 * @author Pablo Muñoz
 *
 */
public class Parameter {
	private String _name;
	
	private String _class;
	
	private String _value;
	
	private String _description;
	
	private String _direction;
	
	private String _dynamic;
	
	private String _exported;
	
	private String _optional;
	
	private String _transient;
	
	private String _updaterate;
	
	/**
	 * Constructor for a new parameter
	 * 
	 * @param _name
	 * @param _class
	 * @param _value
	 * @param _description
	 * @param _direction
	 * @param _dynamic
	 * @param _exported
	 * @param _optional
	 * @param _transient
	 * @param _updaterate
	 */
	public Parameter(String _name, String _class, String _value,
			String _description, String _direction, String _dynamic,
			String _exported, String _optional, String _transient,
			String _updaterate) {
		super();
		this._name = _name;
		this._class = _class;
		this._value = _value;
		this._description = _description;
		this._direction = _direction;
		this._dynamic = _dynamic;
		this._exported = _exported;
		this._optional = _optional;
		this._transient = _transient;
		this._updaterate = _updaterate;
	}

	/**
	 * Constructor for creating a new parameter from an array of String
	 * 
	 * @param content array of string with all the parameter properties
	 * @TODO check if the content array size is correct
	 */
	public Parameter(String[] content) {
		this(content[0],
				content[1],
				content[2],
				content[3],
				content[4],
				content[5],
				content[6],
				content[7],
				content[8],
				content[9]);
	}

	/**
	 * @return the name of the parameter
	 */
	public String get_name() {
		return _name;
	}

	/**
	 * @param _name the new name of the parameter
	 */
	public void set_name(String _name) {
		this._name = _name;
	}

	/**
	 * @return the class of the parameter
	 */
	public String get_class() {
		return _class;
	}

	/**
	 * @param _class the new class of the parameter
	 */
	public void set_class(String _class) {
		this._class = _class;
	}

	/**
	 * @return the value of the parameter
	 */
	public String get_value() {
		return _value;
	}

	/**
	 * @param _value the new value for the parameter
	 */
	public void set_value(String _value) {
		this._value = _value;
	}

	/**
	 * @return the direction
	 */
	public String get_direction() {
		return _direction;
	}

	/**
	 * @param _direction the new direction for the parameter
	 */
	public void set_direction(String _direction) {
		this._direction = _direction;
	}

	/**
	 * @return the exported parameter value
	 */
	public String get_exported() {
		return _exported;
	}

	/**
	 * @param _exported the new value for the exported parameter
	 */
	public void set_exported(String _exported) {
		this._exported = _exported;
	}
	
	
	
	/**
	 * @return the _description
	 */
	public String get_description() {
		return _description;
	}

	/**
	 * @return the _dynamic
	 */
	public String get_dynamic() {
		return _dynamic;
	}

	/**
	 * @return the _optional
	 */
	public String get_optional() {
		return _optional;
	}

	/**
	 * @return the _transient
	 */
	public String get_transient() {
		return _transient;
	}

	/**
	 * @return the _updaterate
	 */
	public String get_updaterate() {
		return _updaterate;
	}

	/**
	 * @param _description the _description to set
	 */
	public void set_description(String _description) {
		this._description = _description;
	}

	/**
	 * @param _dynamic the _dynamic to set
	 */
	public void set_dynamic(String _dynamic) {
		this._dynamic = _dynamic;
	}

	/**
	 * @param _optional the _optional to set
	 */
	public void set_optional(String _optional) {
		this._optional = _optional;
	}

	/**
	 * @param _transient the _transient to set
	 */
	public void set_transient(String _transient) {
		this._transient = _transient;
	}

	/**
	 * @param _updaterate the _updaterate to set
	 */
	public void set_updaterate(String _updaterate) {
		this._updaterate = _updaterate;
	}

	/**
	 * 
	 * @return an array of String with the parameter values
	 */	
	public String[] getText(){
		return new String[]{_name,_class,_value,_description,_direction,_dynamic,_exported,_optional,_transient,_updaterate};
	}

}
